﻿using System;

namespace WardenMonitor
{

    public class PacketEvent : EventArgs
    {
        public Packet Packet { get; private set; }
        
        public PacketEvent(Packet packet)
        {
            Packet = packet;
        }
    }

    public class Packet
    {
        public DateTime Time { get; private set; }
        public byte[] Data { get; private set; }
        public PacketDirection Direction { get; private set; }

        public byte Opcode
        {
            get
            {
                return Data[0];
            }
        }

        public Packet(PacketDirection direction, byte[] data)
        {
            Time = DateTime.Now;
            Data = data;
            Direction = direction;
        }
    }

}